package kr.co.skplanet.commute.controller.api;

import java.util.List;

import kr.co.skplanet.commute.domain.Post;
import kr.co.skplanet.commute.service.BoardService;
import kr.co.skplanet.commute.service.PostService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
public class PostAPIController {
	@Autowired
	PostService postService;
	
	@Autowired
	private BoardService boardService;

	@ResponseBody	
	@RequestMapping( value = { "/post/list.json" }, method = RequestMethod.GET, headers = { "Accept=application/json" } )
	public List list() {	
		
		List<Post> list = postService.getPostList();
		return list;
	} 
		
}
